import { errorHandler, ErrorHandlerType } from './error-handler'

export const SSHErrorHandlerType_Name = 'SSHErrorHandlerType'

export type SSHErrorHandlerType = ErrorHandlerType

import {
  genResult,
  GenResultType,
  genResultByConf,
  GenResultByConfType,
  genSuccessResult,
  GenSuccessResultType,
  genSuccessResultByConf,
  GenSuccessResultByConfType,
  genFailResult,
  GenFailResultType,
  genFailResultByConf,
  GenFailResultByConfType
} from './gen-result.ts'

export const GenSSHResultType_Name = 'GenSSHResultType'
export const GenSSHResultByConfType_Name = 'GenSSHResultByConfType'
export const GenSuccessSSHResultType_Name = 'GenSuccessSSHResultType'
export const GenSuccessSSHResultByConfType_Name = 'GenSuccessSSHResultByConfType'
export const GenFailSSHResultType_Name = 'GenFailSSHResultType'
export const GenFailSSHResultByConfType_Name = 'GenFailSSHResultByConfType'

export type GenSSHResultType = GenResultType
export type GenSSHResultByConfType = GenResultByConfType
export type GenSuccessSSHResultType = GenSuccessResultType
export type GenSuccessSSHResultByConfType = GenSuccessResultByConfType
export type GenFailSSHResultType = GenFailResultType
export type GenFailSSHResultByConfType = GenFailResultByConfType

import {
  genResultBySSHRes,
  GenResultBySSHResType as _GenResultBySSHResType
} from './gen-result-by-ssh-res'

export const GenSSHResultBySSHResType_Name = 'GenSSHResultBySSHResType'

export type GenSSHResultBySSHResType = _GenResultBySSHResType

import {
  testConn,
  TestConnType,
  testConnWithErrMiddleware,
  TestConnWithErrMiddlewareType
} from './test-conn'

export const SSHTestConnType_Name = 'TestConnType'
export const SSHTestConnWithErrMiddlewareType_Name = 'TestConnWithErrMiddlewareType'

export type SSHTestConnType = TestConnType
export type SSHTestConnWithErrMiddlewareType = TestConnWithErrMiddlewareType

export const SSHUtil_Name = 'SSHUtil'

export const SSHUtil: {
  errorHandler: SSHErrorHandlerType
  genResult: GenSSHResultType
  genResultByConf: GenSSHResultByConfType
  genSuccessResult: GenSuccessSSHResultType
  genSuccessResultByConf: GenSuccessSSHResultByConfType
  genFailResult: GenFailSSHResultType
  genFailResultByConf: GenFailSSHResultByConfType
  genResultBySSHRes: GenSSHResultBySSHResType
  testConn: SSHTestConnType
  testConnWithErrMiddleware: SSHTestConnWithErrMiddlewareType
} = {
  errorHandler,
  genResult,
  genResultByConf,
  genSuccessResult,
  genSuccessResultByConf,
  genFailResult,
  genFailResultByConf,
  genResultBySSHRes,
  testConn,
  testConnWithErrMiddleware
}
